﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using HZ.MBSM.BLL;
using Grove.ORM;
using HZ.MBSM.Model;
using HZ.MBSM.DBUtility;
public partial class Hospital_TraProject_date : System.Web.UI.Page
{
    private Int64 AccountId;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (HZ.MBSM.BLL.Login.CheckAssert(this.UseAccountType))
        {
            string strSql;
            HZ.MBSM.Model.Account _Account = (HZ.MBSM.Model.Account)Session["Account"];
            AccountId = _Account.AccountId;
            Db db = new Db();
            System.Data.IDataReader dr;
            strSql = "select distinction from Hospital where AccountId =" + AccountId;
            dr = db.DataReader(strSql);
            dr.Read();
            string _strdistinction = dr["distinction"].ToString();
            dr.Close();
            dr.Dispose();
            db.Close();
            if (_strdistinction == "6")
            {

                Response.Write("<script>alert('请填写医院级别！');</script>");
                Response.Write("<script>window.parent.location.href='HospitalUpdate.aspx';</script>");
            }
            else
            {
                GetProjectData();
            }
        }

    }
    public void GetProjectData()
    {
        AgencyBiding Agb = new AgencyBiding();
        DataTable dt = Agb.GetBidProjectDataTable();
        GridView1.DataSource = dt.DefaultView;
        GridView1.DataBind();
        dt.Dispose();
    }
    #region IPageDescribe 成员

    public string Name
    {
        get { return "交易项目"; }
    }

    public string Describe
    {
        get { return ""; }
    }

    public string ParentName
    {
        get { return "交易项目"; }
    }

    public System.Collections.Generic.List<HZ.MBSM.DAL.AccountType> UseAccountType
    {
        get
        {
            System.Collections.Generic.List<HZ.MBSM.DAL.AccountType> _AccountType = new System.Collections.Generic.List<HZ.MBSM.DAL.AccountType>();
            _AccountType.Add(HZ.MBSM.DAL.AccountType.enumHospitale);
            return _AccountType;
        }
    }

    #endregion
}
